﻿package mortal.game.view.platform
{
    import flash.events.*;
    import flash.net.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class PlatformLinkIcon extends ActionBaseIcon
    {
        private static var _instance:PlatformLinkIcon;

        public function PlatformLinkIcon(param1:String)
        {
            super(param1);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            var _loc_2:* = ParamsConst.instance.platformLinkUrl;
            var _loc_3:* = new URLRequest(_loc_2);
            navigateToURL(_loc_3, "_blank");
            return;
        }// end function

        override public function playEffect(param1:String = "ActionIconEffect.swf") : void
        {
            super.playEffect(param1);
            return;
        }// end function

        override public function get width() : Number
        {
            return 56;
        }// end function

        override public function get height() : Number
        {
            return 54;
        }// end function

        public function showIconByBtnName(param1:String) : void
        {
            btn.styleName = param1;
            btn.drawNow();
            show();
            return;
        }// end function

        public static function get instance() : PlatformLinkIcon
        {
            if (!_instance)
            {
                _instance = new PlatformLinkIcon(ResFileConst.YYZiZuanIcon);
            }
            return _instance;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

        public static function isViewShow() : Boolean
        {
            return hasInstance() && !instance.isHide;
        }// end function

    }
}
